package com.zhiche.lisa.bms.dao.model.quote;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 报价单主表
 * </p>
 *
 * @author liuanshun
 * @since 2018-10-23
 */
@TableName("lisa_quote")
public class Quote extends Model<Quote> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 报价单编码
     */
    private String code;
    /**
     * 分供方类型：0-临时、1-正式
     */
    @TableField("sub_type")
    private Integer subType;
    /**
     * 分供方名称
     */
    @TableField("sub_name")
    private String subName;
    /**
     * 分供方id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("sub_id")
    private Long subId;
    /**
     * 生效日期
     */
    @TableField("effective_date")
    private Date effectiveDate;
    /**
     * 失效日期
     */
    @TableField("invalid_date")
    private Date invalidDate;
    /**
     * 扣点
     */
    private BigDecimal rate;
    /**
     * 状态：0-新增; 1-审核中; 2-已审核; 3-审核不通过; 4-作废'
     */
    private Integer state;
    /**
     * 支付方式: 0-开票, 1-现金
     */
    @TableField("pay_type")
    private Integer payType;
    /**
     * 账期：0-N; 1-N+1; 2-N+2; 3-N+3
     */
    @TableField("pay_days")
    private Integer payDays;
    /**
     * 运输类型
     */
    @TableField("trans_type")
    private Integer transType;
    /**
     * 关联合同号
     */
    @TableField("contract_code")
    private String contractCode;
    /**
     * 关联合id
     */
    @TableField("contract_id")
    private Long contractId;
    /**
     * 关联指令号
     */
    @TableField("com_code")
    private String comCode;
    /**
     * 报价总价
     */
    @TableField("quote_sum")
    private BigDecimal quoteSum;
    /**
     * 标准总价
     */
    @TableField("standard_sum")
    private BigDecimal standardSum;
    /**
     * 溢价率
     */
    private BigDecimal premium;
    /**
     * 溢价率说明
     */
    @TableField("premium_explain")
    private int premiumExplain;
    /**
     * 备注（溢价说明）
     */
    private String remark;
    /**
     * 申请时间
     */
    @TableField("confirm_date")
    private Date confirmDate;
    /**
     * 创建人
     */
    private Long creator;
    /**
     * 租户id
     */
    @TableField("tenant_id")
    private Long tenantId;
    /**
     * 创建时间
     */
    @TableField("gmt_create")
    private Date gmtCreate;
    /**
     * 修改时间
     */
    @TableField("gmt_modify")
    private Date gmtModify;

    /**
     * 申请审批人
     */
    @TableField("confirm_user")
    private String confirmUser;

    /**
     * 审批流程id
     */
    @TableField("activiti_process_id")
    private String activitiProcessId;
    /**
     * 审批流程节点id
     */
    @TableField("activiti_task_id")
    private String activitiTaskId;
    /**
     * 审批流程节点说明
     */
    @TableField("activiti_task_assignee")
    private String activitiTaskAssignee;
    /**
     * 审批流程节点名称
     */
    @TableField("activiti_task_name")
    private String activitiTaskName;

    /**
     * 创建人
     */
    @TableField("creator_name")
    private String creatorName;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getSubType() {
        return subType;
    }

    public void setSubType(Integer subType) {
        this.subType = subType;
    }

    public String getSubName() {
        return subName;
    }

    public void setSubName(String subName) {
        this.subName = subName;
    }

    public Long getSubId() {
        return subId;
    }

    public void setSubId(Long subId) {
        this.subId = subId;
    }

    public Date getEffectiveDate() {
        return effectiveDate;
    }

    public void setEffectiveDate(Date effectiveDate) {
        this.effectiveDate = effectiveDate;
    }

    public Date getInvalidDate() {
        return invalidDate;
    }

    public void setInvalidDate(Date invalidDate) {
        this.invalidDate = invalidDate;
    }

    public BigDecimal getRate() {
        return rate;
    }

    public void setRate(BigDecimal rate) {
        this.rate = rate;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public Integer getPayDays() {
        return payDays;
    }

    public void setPayDays(Integer payDays) {
        this.payDays = payDays;
    }

    public Integer getTransType() {
        return transType;
    }

    public void setTransType(Integer transType) {
        this.transType = transType;
    }

    public String getContractCode() {
        return contractCode;
    }

    public void setContractCode(String contractCode) {
        this.contractCode = contractCode;
    }

    public Long getContractId() {
        return contractId;
    }

    public void setContractId(Long contractId) {
        this.contractId = contractId;
    }

    public String getComCode() {
        return comCode;
    }

    public void setComCode(String comCode) {
        this.comCode = comCode;
    }

    public BigDecimal getQuoteSum() {
        return quoteSum;
    }

    public void setQuoteSum(BigDecimal quoteSum) {
        this.quoteSum = quoteSum;
    }

    public BigDecimal getStandardSum() {
        return standardSum;
    }

    public void setStandardSum(BigDecimal standardSum) {
        this.standardSum = standardSum;
    }

    public BigDecimal getPremium() {
        return premium;
    }

    public void setPremium(BigDecimal premium) {
        this.premium = premium;
    }

    public int getPremiumExplain() {
        return premiumExplain;
    }

    public void setPremiumExplain(int premiumExplain) {
        this.premiumExplain = premiumExplain;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getConfirmDate() {
        return confirmDate;
    }

    public void setConfirmDate(Date confirmDate) {
        this.confirmDate = confirmDate;
    }

    public Long getCreator() {
        return creator;
    }

    public void setCreator(Long creator) {
        this.creator = creator;
    }

    public Long getTenantId() {
        return tenantId;
    }

    public void setTenantId(Long tenantId) {
        this.tenantId = tenantId;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModify() {
        return gmtModify;
    }

    public void setGmtModify(Date gmtModify) {
        this.gmtModify = gmtModify;
    }

    public String getConfirmUser() {
        return confirmUser;
    }

    public void setConfirmUser(String confirmUser) {
        this.confirmUser = confirmUser;
    }

    public String getActivitiProcessId() {
        return activitiProcessId;
    }

    public void setActivitiProcessId(String activitiProcessId) {
        this.activitiProcessId = activitiProcessId;
    }

    public String getActivitiTaskId() {
        return activitiTaskId;
    }

    public void setActivitiTaskId(String activitiTaskId) {
        this.activitiTaskId = activitiTaskId;
    }

    public String getActivitiTaskAssignee() {
        return activitiTaskAssignee;
    }

    public void setActivitiTaskAssignee(String activitiTaskAssignee) {
        this.activitiTaskAssignee = activitiTaskAssignee;
    }

    public String getActivitiTaskName() {
        return activitiTaskName;
    }

    public void setActivitiTaskName(String activitiTaskName) {
        this.activitiTaskName = activitiTaskName;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Quote{");
        sb.append("id=").append(id);
        sb.append(", code='").append(code).append('\'');
        sb.append(", subType=").append(subType);
        sb.append(", subName='").append(subName).append('\'');
        sb.append(", subId=").append(subId);
        sb.append(", effectiveDate=").append(effectiveDate);
        sb.append(", invalidDate=").append(invalidDate);
        sb.append(", rate=").append(rate);
        sb.append(", state=").append(state);
        sb.append(", payType=").append(payType);
        sb.append(", payDays=").append(payDays);
        sb.append(", transType=").append(transType);
        sb.append(", contractCode='").append(contractCode).append('\'');
        sb.append(", contractId=").append(contractId);
        sb.append(", comCode='").append(comCode).append('\'');
        sb.append(", quoteSum=").append(quoteSum);
        sb.append(", standardSum=").append(standardSum);
        sb.append(", premium=").append(premium);
        sb.append(", premiumExplain=").append(premiumExplain);
        sb.append(", remark='").append(remark).append('\'');
        sb.append(", confirmDate=").append(confirmDate);
        sb.append(", creator=").append(creator);
        sb.append(", tenantId=").append(tenantId);
        sb.append(", gmtCreate=").append(gmtCreate);
        sb.append(", gmtModify=").append(gmtModify);
        sb.append(", confirmUser=").append(confirmUser);
        sb.append(", activitiProcessId='").append(activitiProcessId).append('\'');
        sb.append(", activitiTaskId='").append(activitiTaskId).append('\'');
        sb.append(", activitiTaskAssignee='").append(activitiTaskAssignee).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
